class CQueue {
private:
    stack<int> first;//入
    stack<int> second;//出
public:
    CQueue() {
    }

    void appendTail(int value) {
        first.push(value);
    }
    
    int deleteHead() {
        if(second.empty()){
            if(first.empty())return -1;
            while(!first.empty()){
                second.push(first.top());
                first.pop();
            }
        }
        int temp=second.top();
        second.pop();
        return temp;
    }
};

/**
 * Your CQueue object will be instantiated and called as such:
 * CQueue* obj = new CQueue();
 * obj->appendTail(value);
 * int param_2 = obj->deleteHead();
 */